<?php
include("../../config/config.php");
$DM->loadClass("fw","FwUser");
// create and instance class
$object_FwUser = new FwUser();
$object_FwUser->getList();
?>
<html>
<head>
	<title>FwUser</title>
	<link href="<?php echo HTTP_BASE?>/resource/includes/css/admin.css" type="text/css" rel="stylesheet" rev="stylesheet" />
	<script src="<?php echo HTTP_BASE?>/resource/includes/javascript/jquery/jquery-1.2.3.js"></script>
	<script>
	$(function(){

	});
	function apagar(_id){
		if (confirm('Erase this item from the system?')){
			window.location.href='FwUser.delete.php?id='+_id+'&apagar=apag';
		}
	}
	</script>
</head>
<body bgcolor="#FFFFFF" marginheight="0" marginwidth="0" topmargin="0" leftmargin="0">
<div id='header'>
	<h1>LISTA DE FWUSER</h1>
</div>
<div id='actionHeader'>
	<div align="right"><a href=FwUser.edit.php class='mainAction'>ADICIONAR FWUSER</a></div>
</div>
<table border="0" cellpadding="4" cellspacing="1" bgcolor="#efefef" width='100%'>
	<tr>		<td class='titleTd' align='center'>ID</td>
		<td class='titleTd' align='center'>Login</td>
		<td class='titleTd' align='center'>Password</td>
		<td class='titleTd' align='center'>E-mail</td>
		<td class='titleTd' align='center'>First Name</td>
		<td class='titleTd' align='center'>Last Name</td>
		<td class='titleTd' align='center'>Security Level</td>
		<td class='titleTd' align='center'>Enabled</td>
		<td class='titleTd' align='center'>updated_on</td>
		<td class='titleTd' align='center'>created_on</td>
		<td class='titleTd' align='center'>Actions</td>
	</tr>
<?php
for ($i=0;$i<count($object_FwUser->lista);$i++){
	$line = $line!="line1"?"line1":"line2";
	$object_FwUser->id=$object_FwUser->lista[$i]["id"];
	$object_FwUser->getById();
	echo "<TR>
		<td align='center' class='$line'>".($object_FwUser->id)."</td>
		<td align='center' class='$line'>".($object_FwUser->login)."</td>
		<td align='center' class='$line'>".($object_FwUser->pass)."</td>
		<td align='center' class='$line'>".($object_FwUser->email)."</td>
		<td align='center' class='$line'>".($object_FwUser->first_name)."</td>
		<td align='center' class='$line'>".($object_FwUser->last_name)."</td>
		<td align='center' class='$line'>".($object_FwUser->level_id)."</td>
		<td align='center' class='$line'>".($object_FwUser->enabled==1?'ON':'OFF')."</td>
		<td align='center' class='$line'>".($object_FwUser->updated_on)."</td>
		<td align='center' class='$line'>".($object_FwUser->created_on)."</td>
		<td align='center' class='$line'><a class='minorAction' href='FwUser.edit.php?id=$object_FwUser->id'>editar</a> - <a class='minorAction' href='javascript:apagar($object_FwUser->id);'>apagar</a></td>
	";
	echo "</TR>";
}
?>
<div id='actionHeader'>
	<div align="right"><a href='FwUser.edit.php' class='mainAction'>ADICIONAR FWUSER</a></div>
</div>
</table></body></html>